// 节流函数 性能优化
const throtTling = function (func, wait) {
    let previous = 0
    return function () {
        const now = Date.now()
        const context = this
        const args = arguments
        if (now - previous > wait) {
            func.apply(context, args)
            previous = now
        }
    }
}

export {
    throtTling
}